package util.nlp.comparator;

import util.nlp.Node;

public class ByNodeDistance implements java.util.Comparator {
	public int compare(Object a, Object b) {

		double disb = ((Node) b).getDistance();
		double disa = ((Node) a).getDistance();

		if (disb > disa) {

			return 1;
		}

		if (disb < disa) {

			return -1;
		}

		if (disb == disa) {

			return 0;
		}

		return -1;
	}
}